//
// Created by liushuai on 12/28/19
//
#include "catalan.hpp"
double catalan(int n){
    double temp = 0;
    if(n == 1)
        temp = 1;
    else
        temp = catalan(n-1)*(4*n-2)/(n+1);
    return temp;
}
